package com.wnxy.service;

import com.wnxy.util.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Classname ProductService
 * @Description :
 * @Date 2021/2/24 15:59
 * @Created by Yeheng
 */

@FeignClient("product-service")
public interface ProductService {

    @GetMapping("/product/findOne/{pid}")
    ResultVO findOne(@PathVariable("pid")Integer pid);

    @GetMapping("/product/reduceStock/{pid}/{num}")
    ResultVO reduceStock(@PathVariable("pid")Integer pid,@PathVariable("num")Integer num);

    @GetMapping("/product/findAll")
    ResultVO findAll();
}
